package com.java.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.java.dao.ExTopicDao;
import com.java.entity.ExTopic;
import com.java.entity.vo.ExTopicVo;
import com.java.entity.vo.WrongInfo;

/**
* @ClassName: ExTopicMapper
* @Description: ExTopicDao对应的Mapper继承类
* 由ExTopicDao提供基本的增删改查接口，其他业务接口在此实现即可
* @author admin
* @date 2024-03-15
 */
public interface ExTopicMapper extends ExTopicDao {
    
    ExTopic selectByInfo(ExTopic info);

    //List<ExTopic> selectByChapter(@Param("chapterId")String chapterId, @Param("pageOffset")int pageOffset, @Param("pageSize")int pageSize);

    //long selectByChapterCount(@Param("chapterId")String chapterId);

	List<ExTopicVo> selectVoByChapter(@Param("chapterId")String chapterId, @Param("pageOffset")int pageOffset, @Param("pageSize")int pageSize);
	long selectVoByChapterCount(@Param("chapterId")String chapterId);

	List<ExTopicVo> selectVoChapterByExam(@Param("accountId")String accountId, @Param("chapterId")String chapterId, @Param("pageOffset")int pageOffset, @Param("pageSize")int pageSize);
	long selectVoChapterCountByExam(@Param("accountId")String accountId, @Param("chapterId")String chapterId);

	List<ExTopicVo> selectVoByExam(@Param("accountId")String accountId, @Param("chapterId")String chapterId, @Param("pageOffset")int pageOffset, @Param("pageSize")int pageSize);
	long selectVoByExamCount(@Param("accountId")String accountId, @Param("chapterId")String chapterId);

	ExTopicVo selectVo(@Param("topicId")String topicId);
	
	List<WrongInfo> selectWrongs(@Param("accountId")String accountId, @Param("recordId")String recordId, @Param("result")Integer result, 
			@Param("pageOffset")int pageOffset, @Param("topicId")int pageSize);

	long selectWrongCount(@Param("accountId")String accountId, @Param("recordId")String recordId, @Param("result")Integer result);
}
